Optimal. Leaf size=182 \[ \frac {7 a c^4 (2 A-B) \cos ^3(e+f x)}{24 f}+\frac {7 a (2 A-B) \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{40 f}+\frac {7 a c^4 (2 A-B) \sin (e+f x) \cos (e+f x)}{16 f}+\frac {7}{16} a c^4 x (2 A-B)+\frac {a (2 A-B) \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{10 f}-\frac {a B c \cos ^3(e+f x) (c-c \sin (e+f x))^3}{6 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.30, antiderivative size = 182, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {2967, 2860, 2678, 2669, 2635, 8} \[ \frac {7 a c^4 (2 A-B) \cos ^3(e+f x)}{24 f}+\frac {a (2 A-B) \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{10 f}+\frac {7 a (2 A-B) \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{40 f}+\frac {7 a c^4 (2 A-B) \sin (e+f x) \cos (e+f x)}{16 f}+\frac {7}{16} a c^4 x (2 A-B)-\frac {a B c \cos ^3(e+f x) (c-c \sin (e+f x))^3}{6 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 2669
Rule 2678
Rule 2860
Rule 2967
Rubi steps
\begin {align*} \int (a+a \sin (e+f x)) (A+B \sin (e+f x)) (c-c \sin (e+f x))^4 \, dx &=(a c) \int \cos ^2(e+f x) (A+B \sin (e+f x)) (c-c \sin (e+f x))^3 \, dx\\ &=-\frac {a B c \cos ^3(e+f x) (c-c \sin (e+f x))^3}{6 f}+\frac {1}{2} (a (2 A-B) c) \int \cos ^2(e+f x) (c-c \sin (e+f x))^3 \, dx\\ &=-\frac {a B c \cos ^3(e+f x) (c-c \sin (e+f x))^3}{6 f}+\frac {a (2 A-B) \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{10 f}+\frac {1}{10} \left (7 a (2 A-B) c^2\right ) \int \cos ^2(e+f x) (c-c \sin (e+f x))^2 \, dx\\ &=-\frac {a B c \cos ^3(e+f x) (c-c \sin (e+f x))^3}{6 f}+\frac {a (2 A-B) \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{10 f}+\frac {7 a (2 A-B) \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{40 f}+\frac {1}{8} \left (7 a (2 A-B) c^3\right ) \int \cos ^2(e+f x) (c-c \sin (e+f x)) \, dx\\ &=\frac {7 a (2 A-B) c^4 \cos ^3(e+f x)}{24 f}-\frac {a B c \cos ^3(e+f x) (c-c \sin (e+f x))^3}{6 f}+\frac {a (2 A-B) \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{10 f}+\frac {7 a (2 A-B) \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{40 f}+\frac {1}{8} \left (7 a (2 A-B) c^4\right ) \int \cos ^2(e+f x) \, dx\\ &=\frac {7 a (2 A-B) c^4 \cos ^3(e+f x)}{24 f}+\frac {7 a (2 A-B) c^4 \cos (e+f x) \sin (e+f x)}{16 f}-\frac {a B c \cos ^3(e+f x) (c-c \sin (e+f x))^3}{6 f}+\frac {a (2 A-B) \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{10 f}+\frac {7 a (2 A-B) \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{40 f}+\frac {1}{16} \left (7 a (2 A-B) c^4\right ) \int 1 \, dx\\ &=\frac {7}{16} a (2 A-B) c^4 x+\frac {7 a (2 A-B) c^4 \cos ^3(e+f x)}{24 f}+\frac {7 a (2 A-B) c^4 \cos (e+f x) \sin (e+f x)}{16 f}-\frac {a B c \cos ^3(e+f x) (c-c \sin (e+f x))^3}{6 f}+\frac {a (2 A-B) \cos ^3(e+f x) \left (c^2-c^2 \sin (e+f x)\right )^2}{10 f}+\frac {7 a (2 A-B) \cos ^3(e+f x) \left (c^4-c^4 \sin (e+f x)\right )}{40 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.98, size = 131, normalized size = 0.72 \[ \frac {a c^4 (120 (7 A-5 B) \cos (e+f x)+20 (13 A-7 B) \cos (3 (e+f x))+240 A \sin (2 (e+f x))-90 A \sin (4 (e+f x))-12 A \cos (5 (e+f x))+840 A f x+15 B \sin (2 (e+f x))+105 B \sin (4 (e+f x))-5 B \sin (6 (e+f x))+36 B \cos (5 (e+f x))-420 B f x)}{960 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 123, normalized size = 0.68 \[ -\frac {48 \, {\left (A - 3 \, B\right )} a c^{4} \cos \left (f x + e\right )^{5} - 320 \, {\left (A - B\right )} a c^{4} \cos \left (f x + e\right )^{3} - 105 \, {\left (2 \, A - B\right )} a c^{4} f x + 5 \, {\left (8 \, B a c^{4} \cos \left (f x + e\right )^{5} + 2 \, {\left (18 \, A - 25 \, B\right )} a c^{4} \cos \left (f x + e\right )^{3} - 21 \, {\left (2 \, A - B\right )} a c^{4} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{240 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.17, size = 184, normalized size = 1.01 \[ -\frac {B a c^{4} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac {7}{16} \, {\left (2 \, A a c^{4} - B a c^{4}\right )} x - \frac {{\left (A a c^{4} - 3 \, B a c^{4}\right )} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac {{\left (13 \, A a c^{4} - 7 \, B a c^{4}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} + \frac {{\left (7 \, A a c^{4} - 5 \, B a c^{4}\right )} \cos \left (f x + e\right )}{8 \, f} - \frac {{\left (6 \, A a c^{4} - 7 \, B a c^{4}\right )} \sin \left (4 \, f x + 4 \, e\right )}{64 \, f} + \frac {{\left (16 \, A a c^{4} + B a c^{4}\right )} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.59, size = 342, normalized size = 1.88 \[ \frac {-\frac {A \,c^{4} a \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}-3 A \,c^{4} a \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 A \,c^{4} a \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+2 A \,c^{4} a \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+3 A \,c^{4} a \cos \left (f x +e \right )+B \,c^{4} a \left (-\frac {\left (\sin ^{5}\left (f x +e \right )+\frac {5 \left (\sin ^{3}\left (f x +e \right )\right )}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )+\frac {3 B \,c^{4} a \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}+2 B \,c^{4} a \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 B \,c^{4} a \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}-3 B \,c^{4} a \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )+A \,c^{4} a \left (f x +e \right )-B \,c^{4} a \cos \left (f x +e \right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.60, size = 336, normalized size = 1.85 \[ -\frac {64 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} A a c^{4} - 640 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a c^{4} + 90 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} A a c^{4} - 480 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a c^{4} - 960 \, {\left (f x + e\right )} A a c^{4} - 192 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} B a c^{4} - 640 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a c^{4} - 5 \, {\left (4 \, \sin \left (2 \, f x + 2 \, e\right )^{3} + 60 \, f x + 60 \, e + 9 \, \sin \left (4 \, f x + 4 \, e\right ) - 48 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a c^{4} - 60 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a c^{4} + 720 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a c^{4} - 2880 \, A a c^{4} \cos \left (f x + e\right ) + 960 \, B a c^{4} \cos \left (f x + e\right )}{960 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 14.83, size = 454, normalized size = 2.49 \[ \frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {A\,a\,c^4}{4}+\frac {7\,B\,a\,c^4}{8}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}\,\left (6\,A\,a\,c^4-2\,B\,a\,c^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (12\,A\,a\,c^4-4\,B\,a\,c^4\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{11}\,\left (\frac {A\,a\,c^4}{4}+\frac {7\,B\,a\,c^4}{8}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (22\,A\,a\,c^4-18\,B\,a\,c^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (\frac {13\,A\,a\,c^4}{2}-\frac {37\,B\,a\,c^4}{4}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (\frac {13\,A\,a\,c^4}{2}-\frac {37\,B\,a\,c^4}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {38\,A\,a\,c^4}{5}-\frac {34\,B\,a\,c^4}{5}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (\frac {68\,A\,a\,c^4}{3}-\frac {44\,B\,a\,c^4}{3}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (\frac {27\,A\,a\,c^4}{4}-\frac {73\,B\,a\,c^4}{24}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9\,\left (\frac {27\,A\,a\,c^4}{4}-\frac {73\,B\,a\,c^4}{24}\right )+\frac {34\,A\,a\,c^4}{15}-\frac {22\,B\,a\,c^4}{15}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}+6\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}+15\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+20\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+15\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+6\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}+\frac {7\,a\,c^4\,\mathrm {atan}\left (\frac {7\,a\,c^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,A-B\right )}{8\,\left (\frac {7\,A\,a\,c^4}{4}-\frac {7\,B\,a\,c^4}{8}\right )}\right )\,\left (2\,A-B\right )}{8\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 7.88, size = 853, normalized size = 4.69 \[ \begin {cases} - \frac {9 A a c^{4} x \sin ^{4}{\left (e + f x \right )}}{8} - \frac {9 A a c^{4} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + A a c^{4} x \sin ^{2}{\left (e + f x \right )} - \frac {9 A a c^{4} x \cos ^{4}{\left (e + f x \right )}}{8} + A a c^{4} x \cos ^{2}{\left (e + f x \right )} + A a c^{4} x - \frac {A a c^{4} \sin ^{4}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {15 A a c^{4} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {4 A a c^{4} \sin ^{2}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {2 A a c^{4} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} + \frac {9 A a c^{4} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} - \frac {A a c^{4} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {8 A a c^{4} \cos ^{5}{\left (e + f x \right )}}{15 f} - \frac {4 A a c^{4} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {3 A a c^{4} \cos {\left (e + f x \right )}}{f} + \frac {5 B a c^{4} x \sin ^{6}{\left (e + f x \right )}}{16} + \frac {15 B a c^{4} x \sin ^{4}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{16} + \frac {3 B a c^{4} x \sin ^{4}{\left (e + f x \right )}}{4} + \frac {15 B a c^{4} x \sin ^{2}{\left (e + f x \right )} \cos ^{4}{\left (e + f x \right )}}{16} + \frac {3 B a c^{4} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{2} - \frac {3 B a c^{4} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {5 B a c^{4} x \cos ^{6}{\left (e + f x \right )}}{16} + \frac {3 B a c^{4} x \cos ^{4}{\left (e + f x \right )}}{4} - \frac {3 B a c^{4} x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {11 B a c^{4} \sin ^{5}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{16 f} + \frac {3 B a c^{4} \sin ^{4}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {5 B a c^{4} \sin ^{3}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{6 f} - \frac {5 B a c^{4} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{4 f} + \frac {4 B a c^{4} \sin ^{2}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{f} - \frac {2 B a c^{4} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {5 B a c^{4} \sin {\left (e + f x \right )} \cos ^{5}{\left (e + f x \right )}}{16 f} - \frac {3 B a c^{4} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{4 f} + \frac {3 B a c^{4} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} + \frac {8 B a c^{4} \cos ^{5}{\left (e + f x \right )}}{5 f} - \frac {4 B a c^{4} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {B a c^{4} \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (A + B \sin {\relax (e )}\right ) \left (a \sin {\relax (e )} + a\right ) \left (- c \sin {\relax (e )} + c\right )^{4} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________